<?php
namespace Sms;
require_once "SmsSender.php";
use Sms\SmsSingleSender;
use Sms\SmsMultiSender;
/**
 *
 */
class Sender
{

    public function __construct($_appid,$_appkey)
    {
        $this->appid = $_appid;
        $this->appkey = $_appkey;
    }
    public function __call ($name, $arguments)
    {
        return "The function is not exist!";
    }

    /**验证码发送接口
     * @param $_RecNum string 手机号,
     * @param $_smsParam json 短信模板变量,
     * @param $templId string 短信模板id,
     * @param $_extend string 公共回传参数,
     * @param $_smsFreeSignName string 短信签名,
     * @param $_smsType string 短信类型 defult normal,
     * @return bool
     */
    public function send($_RecNum,$templId,$params)
    {
        $singleSender = new SmsSingleSender($this->appid, $this->appkey);

        $result = $singleSender->sendWithParam("86", $_RecNum, $templId, $params, "", "", "");
        return json_decode($result);
    }
}
